import java.util.Scanner;

public class demo06 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入第一个数");
        int num1 = sc.nextInt();
        System.out.println("请输入运算符");
        String str= sc.next();
        System.out.println("请输入第二个数");
        int num2 = sc.nextInt();

        if (str.equals("+")){
            System.out.println(num1 + "+" + num2 + "=" + (num1+num2));
        }
        if (str.equals("-")){
            System.out.println(num1 + "-" + num2 + "=" + (num1-num2));
        }
        if (str.equals("*")){
            System.out.println(num1 + "*" + num2 + "=" + (num1*num2));
        }
        if (str.equals("/") && num2 != 0){
            System.out.println(num1 + "/" + num2 + "=" + (num1/num2));
        }else {
            System.out.println("除数不能为0");
        }
    }
}
